<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <script src="vendor/jquery/jquery-3.2.1.min.js" type="text/javascript" charset="utf-8"></script>
    <link rel="stylesheet" type="text/css" href="js/bootstarp-3.3.7/css/bootstrap.min.css" />
		<!--<script src="js/jquery-3.2.0.min.js" type="text/javascript" charset="utf-8"></script>-->
		<!--<script src="vendor/jquery/jquery-3.2.0.min.js" type="text/javascript" charset="utf-8"></script>-->
		<script src="js/bootstarp-3.3.7/js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="js/bootstarp-table-1.11.1/bootstrap-table.min.css" />
		<script type="text/javascript" charset="utf-8" src="js/bootstarp-table-1.11.1/bootstrap-table.min.js"></script>
		<script src="js/bootstarp-table-1.11.1/bootstrap-table-zh-CN.min.js" type="text/javascript" charset="utf-8"></script>
    <link rel="stylesheet" href="assets/layui-v2.4.5/layui/css/layui.css">
    <link rel="stylesheet" href="assets/css/admin.css">
   
    <title>管理后台</title>
    
    <style type="text/css">
    	a:hover{
    		text-decoration: none;
    	}
    	a:visited{
    		
    		text-decoration: none;
    	}
    	
    	a:link{
    		
    		text-decoration: none;
    	}
    </style>
       <script>
    $(function () {  //, headers: { 'x-requested-with': 'XMLHttpRequest' }
        $.ajaxSetup({crossDomain: true, xhrFields: {withCredentials: true}});
    });
	</script>
	
    <script>
   	$(function(){
   		var username =  localStorage.getItem("username");
   		 $("#usernmae").html(username)
   		 
   		 
   		 
   		 $("#logout").click(function(){
// 		 	alert(11)
   		 	$.ajax({
   		 		type:"get",
   		 		url:"http://127.0.0.1:8099/login/logout",
   		 		dataType:"text",
   		 		success:function(data){
   		 			alert(data)
   		 			if(data==1){
   		 				location.href="login.html"
   		 			}
   		 			
   		 		}
   		 	});
   		 	
   		 })
   		 
   		 $("#updatePwd").click(function(){
   		 	$("#myModal").modal("show")
   		 })
   		 
   		 $("#oldpwd").blur(function(){
   		 	$.ajax({
   		 		type:"get",
   		 		url:"http://127.0.0.1:8099/login/lodpwdIs?&password="+$("#oldpwd").val(),
   		 		async:true,
   		 		success:function(data){
   		 			if (data==1) {
   		 				alert("密码错误！")
   		 			} else{
   		 				alert("密码正确！")
   		 			}
   		 			
   		 		}
   		 		
   		 	});
   		 	
   		 	
   		 })
   		 
   		 $("#pwdok").click(function(){
   		 	var userName = $("#usernmae").text()
   		 	var newp = $("#newpwd").val()
   		 	var news = $("#newspwd").val()
   		 	 if(newp==news){
   		 	 	
   		 	 	$.ajax({
   		 	 		type:"get",
   		 	 		url:"http://127.0.0.1:8099/login/updatepwd?userName="+userName+"&password="+news,
   		 	 		async:true,
   		 	 		success:function(data){
   		 	 			if(data==1){
   		 	 				alert("修改成功！")
   		 	 			$.ajax({
			   		 		type:"get",
			   		 		url:"http://127.0.0.1:8099/login/logout",
			   		 		dataType:"text",
			   		 		success:function(data){
//			   		 			alert(data)
			   		 			if(data==1){
			   		 				location.href="login.html"
			   		 			}
			   		 			
			   		 		}
   		 			});
   		 	 			
   		 	 		
   		 	 				
   		 	 			}
   		 	 			
   		 	 			
   		 	 		}
   		 	 	});
   		 	 	
   		 	 }
   		 })
   		
   	})
</script>

</head> 
<body class="layui-layout-body">
    <div class="layui-layout layui-layout-admin">
        <div class="layui-header custom-header">
            
            <ul class="layui-nav layui-layout-left">
                <li class="layui-nav-item slide-sidebar" lay-unselect>
                    <a href="javascript:;" class="icon-font"><i class="ai ai-menufold"></i></a>
                </li>
            </ul>

            <ul class="layui-nav layui-layout-right">
                <li class="layui-nav-item">
                    <a href="javascript:;" id="usernmae" >BieJun</a>
                    <dl class="layui-nav-child">
                        <dd><a style="cursor: pointer;" id="updatePwd">修改密码</a></dd>
                        <dd><a style="cursor: pointer;" id="logout">退出</a></dd>
                    </dl>
                </li>
            </ul>
        </div>

        <div class="layui-side custom-admin">
            <div class="layui-side-scroll">

                <div class="custom-logo">
                    <img src="assets/images/timg.png" alt=""/>
                    <h1>利民医疗机构</h1>
                </div>
                <ul id="Nav" class="layui-nav layui-nav-tree">
                    <li class="layui-nav-item">
                        <a href="javascript:;">
                        	
                            <i class="layui-icon layui-icon-user"></i>
                            <em>看病就诊</em>
                        </a><dl class="layui-nav-child">
                            <dd><a href="views/home.html">主页</a></dd>
                        </dl>
                        <dl class="layui-nav-child">
                            <dd><a href="xkjz.html">新开就诊</a></dd>
                        </dl>
                        <dl class="layui-nav-child">
                            <dd><a href="jzlb.html">就诊列表</a></dd>
                        </dl>
                        <dl class="layui-nav-child">
                            <dd><a href="YiSheng.html">医生排班</a></dd>
                        </dl>
                        <dl class="layui-nav-child">
                            <dd><a href="mzgh.html">门诊挂号</a></dd>
                        </dl>
                        
                        <dl class="layui-nav-child">
                            <dd><a href="Registration_list.html">挂号列表</a></dd>
                        </dl>
                        <dl class="layui-nav-child">
                            <dd><a href="HuanZhe.html">患者库</a></dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item">
                        <a href="javascript:;">
                            <i class="layui-icon layui-icon-rmb"></i>
                            <em>收费发药</em>
                        </a>
                        <dl class="layui-nav-child">
                            <dd><a href="views/sffy.html">收费发药</a></dd>
                            
                        </dl>
                    </li>
                    <li class="layui-nav-item">
                        <a href="javascript:;">
                            <i class="layui-icon layui-icon-cart-simple"></i>
                            <em>药品进销存</em>
                        </a>
                        <dl class="layui-nav-child">
                            <dd><a href="views/users.html">药品信息维护</a></dd>
                            <dd><a href="views/supplier.html">供应商信息维护</a></dd>
                        
                            <dd><a href="views/operaterule_one.html">采购入库</a></dd>
                            <dd><a href="views/audit-list.html">入库审核</a></dd>
                            <dd><a href="views/stock.html">库存查询</a></dd>

                        </dl>
                    </li>
                     <li class="layui-nav-item">
                        <a href="javascript:;">
                            <i class="layui-icon layui-icon-form"></i>
                            <em>数据统计</em>
                        </a>
                        <dl class="layui-nav-child">
                            <dd><a href="his_count.html">诊所收支统计</a></dd>
                            <dd><a href="med_count.html">药品销售统计</a></dd>
                        
                            <dd><a href="views/ins_pro_sta.html">检查项目统计</a></dd>
                            <dd><a href="views/Report_Sta(1).html">年月报表统计</a></dd>
                            <dd><a href="work_count.html">工作量统计</a></dd>

                        </dl>
                    </li>
                     <li class="layui-nav-item">
                        <a href="javascript:;">
                            <i class="layui-icon layui-icon-set-sm"></i>
                            <em>系统设置</em>
                        </a>
                        <dl class="layui-nav-child">
                            <dd><a href="dm.html">医生管理</a></dd>
                            <dd><a href="views/doctormanager.html">权限管理</a></dd>
                            <dd><a href="views/KSdepa.html">科室管理</a></dd>
                        
                            <dd><a href="views/registration.html">挂号费管理</a></dd>
                            <dd><a href="Prescription_surcharge.html">处方附加费</a></dd>
                            <dd><a href="Inspection_item_fee.html">检查项目费</a></dd>
						
							
                        </dl>
                    </li>
                </ul>

            </div>
        </div>

        <div class="layui-body">
             <div class="layui-tab app-container" lay-allowClose="true" lay-filter="tabs">
                <ul id="appTabs" class="layui-tab-title custom-tab"></ul>
                <div id="appTabPage" class="layui-tab-content"></div>
            </div>
        </div>

        <div class="layui-footer">
            <p>© 2018 DEMO</p>
        </div>

        <div class="mobile-mask"></div>
    </div>


<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">修改密码</h4>
      </div>
      <div class="modal-body" >
      	<div class="ftc pd10" >
      <div class="input-group listSeaForm wb100 col-xs-10">
         			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    <span class="input-group-btn"> <span class="btn" style="font-size: 17px;font-family:'宋体'">原密码：</span> </span>  <input type="password" class="form-control input-l" style="border-radius: 9px;font-family:'宋体'" id="oldpwd" value="" placeholder="输入旧密码" />
            </div> <br />
         	<div class="input-group listSeaForm wb100 col-xs-10">
         		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span  class="input-group-btn"> <span class="btn" style="font-size: 17px;font-family:'宋体'">新密码：</span> </span> <input type="password" class="form-control input-l" style="border-radius: 9px;font-family:'宋体'" id="newpwd" placeholder="输入新密码" />
       		  </div>
         <br />
        	 <div class="input-group listSeaForm wb100 col-xs-10">
         	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 	 <span  class="input-group-btn"><span class="btn" style="font-size: 17px;font-family:'宋体'">新密码：</span> </span><input type="password"  class="form-control input-l" style="border-radius: 9px;font-family:'宋体'" id="newspwd" placeholder="输入新密码" />
       	  </div>
      	</div>
        
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="button" class="btn btn-primary" id="pwdok">确认</button>
      </div>
    </div>
  </div>
</div>





    <script src="assets/layui.js"></script>
    <script src="js/index.js" data-main="home"></script>
</body>
</html>   